package tazadum.engine.math;

import java.util.Random;

public class Volume {
	private final Vector p;
	private final Vector size;

	public Volume(final Vector p, final Vector size) {
		this.p = p;
		this.size = size;
	}

	public Vector random(final Random random) {
		final float x = random.nextFloat() * size.x;
		final float y = random.nextFloat() * size.y;
		final float z = random.nextFloat() * size.z;
		return new Vector(p.x + x, p.y + y, p.z + z);
	}

	@Override
	public String toString() {
		return "Volume at " + p + " with size " + size;
	}
}
